package lab01;

import java.util.Scanner;

/**
 * Created by lenovo on 2017/10/9.
 */
public class Test13 {
    public static void main(String[] args) {
        for (int num = 1; num < 1000; num++) {
            int one;
            int ten;
            int hun;
            int tho;
            int count;
            one = num % 10;
            ten = num % 100 / 10;
            hun = num % 1000 / 100;
            tho = num / 1000;
            count = one * one * one + ten * ten * ten + hun * hun * hun + tho * tho * tho;
            if (num == count) {
                System.out.print(num + "\t");
            }
        }
    }
}
